interface Bird {
    weight: number
    leg: number
    wings: number
}

interface Horse {
    weight: number
    leg: number
    id: string
}

type T = Bird | Horse

type Animal = Omit<T, never> // 相当于 interface Animal { weight: number; leg: number }

let bird!: Bird
let horse!: Horse

let x1: T = bird
let x2: Animal = bird
x2 = horse
let x3: Bird | Horse = bird

